//查询通知公告相关的接口函数
import request from '@/utils/request'


//根据通知公告页面大小获取通知公告列表
export const getInformListApi = (page,size) => {
    return request({
        url: `/inform/${page}/${size}`,
        method: "get"
    })
}
export const getInformById = id => {
    return request({
        url: `/inform/${id}`,
        method: "get"
    })
}
//根据用户获取管理的公告
export const getInformListByUser = (page,size) => {
    return request({
        url: `/inform/${page}/${size}`,
        method: "get"
    })
}
//增
export const createInformApi = (data) => {
    return request.postForm(`/inform`,data)
}

//删
export const deleteInformByIdApi = id => {
    return request({
        url: `/inform/${id}`,
        method: "delete",
    })
}

//改
export const updateInformApi = data => {
    return request({
        url: `/inform?infromId=${data.id}?title=${data.title}`,
        method: "put",
        data
    })
}
